package com.topisv.tms.shiro;

import java.io.Serializable;
import java.util.UUID;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

/**
 * 自定义的sessionId生成器
 *  Date          Author       Version       Description
 * ----------------------------------------------------------
 *  2015-7-20      CC            1.0           Create
 */
public class RouteSessionIdGenerator implements SessionIdGenerator {
	private String node = System.getProperty("wms.app.node");

	@Override
	public Serializable generateId(Session session) {
		return new StringBuffer().append(UUID.randomUUID().toString()).append(".").append(node).toString();
	}

}
